From 25fc3fb4645e8d079f8e3648ec40fa08088b30fd Mon Sep 17 00:00:00 2001 From: Tim Deegan Date: Tue, 20 Feb 2007 13:57:26 +0000 Subject: [PATCH] [XEN] Fix skip-verify shadow heuristic Signed-off-by: Tim Deegan --- xen/arch/x86/mm/shadow/multi.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/xen/arch/x86/mm/shadow/multi.c b/xen/arch/x86/mm/shadow/multi.c index 7af102f89b..d6eeeb69d9 100644 --- a/xen/arch/x86/mm/shadow/multi.c +++ b/xen/arch/x86/mm/shadow/multi.c @@ -3932,8 +3932,7 @@ static int safe_not_to_verify_write(mfn_t gmfn, void *dst, void *src, #if (SHADOW_OPTIMIZATIONS & SHOPT_SKIP_VERIFY) struct page_info *pg = mfn_to_page(gmfn); if ( !(pg->shadow_flags & SHF_32) - && bytes == 4 - && ((unsigned long)dst & 3) == 0 ) + && ((unsigned long)dst & 7) == 0 ) { /* Not shadowed 32-bit: aligned 64-bit writes that leave the * present bit unset are safe to ignore. */ @@ -3942,8 +3941,7 @@ static int safe_not_to_verify_write(mfn_t gmfn, void *dst, void *src, return 1; } else if ( !(pg->shadow_flags & (SHF_PAE|SHF_64)) - && bytes == 8 - && ((unsigned long)dst & 7) == 0 ) + && ((unsigned long)dst & 3) == 0 ) { /* Not shadowed PAE/64-bit: aligned 32-bit writes that leave the * present bit unset are safe to ignore. */ -- 2.30.2